package presentation;

import nd.main.R;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class HomeItemViewHolder {
	private View mRow;
	protected ImageView mImage;
	protected TextView mTitle;
	protected TextView mDate;
	
	// init class with specified info
	public HomeItemViewHolder(View row) 
	{
		mRow = row;
	}

	public ImageView getImageView() 
	{
		if(mImage == null)
		{
			mImage = (ImageView)mRow.findViewById(R.id.itemimg);
		}
		return mImage;
	}     
		 
	public TextView getTitleView() 
	{
		if(mTitle == null)
		{
			mTitle = (TextView)mRow.findViewById(R.id.itemtitle);
		}
		return mTitle;
	} 
	
	public TextView getDateView() 
	{
		if(mDate == null)
		{
			mDate = (TextView)mRow.findViewById(R.id.itemdate);
		}
		return mDate;
	} 
}
